<script>

export default {
    name: 'App',
    components: {},
    data() {
        return {
            name: "李五"
        }
    },
    methods: {
        men(event) {
            console.log(event)
            // 阻止事件冒泡
            event.stopPropagation()

            // 阻止默认行为
            event.preventDefault()
        }
    },
    render(createElement, context) {
        //domPropsInnerHTML={html} 需要字符串标签
        let html = "<span>你好</span>"

        /*const HelloWorld = ({ props }) => <p>hello {props.message}</p>
        console.log(HelloWorld)*/
        return (
                <div>
                    <input vModel={this.name} />
                    <br/>
                    <input vModel_trim={this.name} />
                    双向绑定{this.name}
                    <br/>
                    <span domPropsInnerHTML={html} ></span>
                    {HelloWorld}
                </div>

        )
    }
}
</script>
<style scoped>
.title {
    width: 100px;
    height: 100px;
    background-color: #42b983;
    text-align: center;
    padding-top: 40px;
}
</style>